const { defineConfig } = require('@vue/cli-service');

module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    // port: '8099',
    // host: '127.0.0.1',
    // node-http-proxy
    // proxy: 'http://localhost:3008',
    proxy: {
      '/api': {
        ws: false,
        target: 'http://127.0.0.1:3000',
        changeOrigin: true,
        pathRewrite: {
          '^/api': '',
        },
      },
      '/': {
        ws: false,
        target: 'http://localhost:3000',
      },
      '/test': {
        ws: false,
        target: 'http://localhost:3009',
      },
    },
  },
});
